package com.example.medicine.controller;


import com.example.medicine.Bean.yian.yian;
import com.example.medicine.Bean.yian.yianWithCompany;
import com.example.medicine.Mapper.xslrMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@Slf4j
@RestController
@RequestMapping(value="/xslr")
public class xslrController {
    @Autowired
    xslrMapper xslrMapper;
    @RequiresPermissions("学生录入查询")
    @GetMapping("/")
    public List<yianWithCompany> getxslrList() {
        log.info("getxslrList获取学生录入医案信息");
        // 从数据库中获取数据
        return xslrMapper.getAll();
    }
    @RequiresPermissions("学生录入查询")
@PutMapping("/{id}")
    public void repulseyian(@PathVariable long id){
        log.info("repulseyian修改医案审核信息");
        xslrMapper.updateDh(id);
}
}
